package com.tbit.uqbike.client.service.impl;

import com.tbit.uqbike.client.dao.log.OssPushLogDao;
import com.tbit.uqbike.client.pojo.newEntity.OssPushLog;
import com.tbit.uqbike.client.service.OssPushLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Author: chen
 * @Description:
 * @Date: 创建于 11:42 2022/11/4
 */
@Service
public class OssPushLogServiceImpl implements OssPushLogService {

    @Autowired
    private OssPushLogDao ossPushLogDao;

    @Override
    public void add(String orderNO, Integer adAccountId, Integer num, Integer result,
                    String content) {
        OssPushLog ossPushLog = new OssPushLog();
        ossPushLog.setAdAccountId(adAccountId);
        ossPushLog.setAddTime(new Date());
        ossPushLog.setContent(content);
        ossPushLog.setNum(num);
        ossPushLog.setOrderNO(orderNO);
        ossPushLog.setResult(result);
        ossPushLog.setState(0);
        ossPushLogDao.insert(ossPushLog);

    }
}
